


// Fix for window-panel (managers)

.workflowactiondialog-card.engine-window,
.publicationstatuswindow-card.engine-window {

    div.x-window-header {
        pointer-events: none;
    }

    div.x-window-header .x-window-header-text {
        display: inline-block !important;
        position: fixed !important;
        width: 100% !important;
        max-width: calc(100% - 100px) !important;
        font-size: 18px !important;
        font-weight: 300 !important;
    }

    > .x-window-bwrap {
        margin-top: 126px;

        .x-window-body.x-window-body-noborder {
            overflow: hidden;
        }

        .x-window-bbar .x-panel-fbar .x-toolbar-cell {
            margin-left: 5px !important;
        }
    }

    .x-grid3 {
        .x-grid3-row-table {
            width: 100% !important;
        }
    }

    .x-toolbar-left {
        bottom: 0 !important;
    }

    .workflowactiondialog-ctn .x-border-layout-ct:nth-child(2) > .x-border-panel .x-form-element .x-form-field-wrap.x-component { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 1 */
        overflow: hidden !important;
    }

    .workflowactiondialog-ctn .x-border-layout-ct:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 2 */
        > div.x-component:nth-child(1) {
            height: calc(100% - 193px) !important;
        }
    }

    .workflowactiondialog-ctn .x-border-layout-ct:nth-child(3) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 3 */
        width: 100% !important;

        > div {
            width: 100% !important;
        }
    }

    .workflow-action-dialog .x-tab-panel-body-top > div {
        height: 100% !important;
        width: 100% !important;

        > div {
            width: 100% !important;
        }
    }

    .publicationstatuswindow-ctn .x-border-layout-ct:nth-child(2) > .x-border-panel .x-form-element .x-form-field-wrap.x-component { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 4 */
        overflow: hidden !important;
    }

    .publication-status-window .x-tab-panel-body-top .x-border-layout-ct {
        height: 100% !important;
        width: calc(100% + 162px) !important;
    }

    .x-border-layout-ct:nth-child(2) > .x-border-panel:nth-child(2) .x-panel-bwrap { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 5 */
        // width: calc(100% - 162px) !important;
    }

    .x-tab-panel-body-top .x-component.x-border {
        height: calc(100% + 162px) !important;
    }
}

.workflowactiondialog-ctn,
.publicationstatuswindow-ctn {

    background: linear-gradient(to right bottom, whitesmoke 50%, #e5e4e4 100%) !important;

    fieldset.x-fieldset:nth-child(odd) {
        background: none !important;
    }

    > .x-border-panel:first-child {
        height: 150px !important;
        width: 100% !important;
        z-index: 9999999;
    }

    .x-border-panel > .x-panel-bwrap {
        width: calc(100% - 16px) !important;
        height: 100% !important;

        &:only-child {
            height: calc(100% - 15px) !important;
        }

        .x-panel-ml,
        .x-panel-mr,
        .x-panel-mc {
            height: 100%;
        }
    }

    .x-grid3-body {
        padding: 0 47px;
    }

    .workflow-action-dialog {
        .x-tab-panel-header {
            top: 284px !important;
            height: calc(100% - 338px) !important;
            padding-top: 30px !important;
            background: whitesmoke !important;
            box-shadow: inset 1px 1px 2px 0px _color("black", a), 0px 2px 3px _color("black", a) !important;
        }

        .x-grid3 .x-grid3-row-table .x-grid3-cell {
            width: calc((100% - 204px) / 3) !important;
            display: inline-block;

            &:nth-child(4) {
                width: 204px !important;
            }

            &:nth-child(5) {
                display: none;
            }
        }

        .x-grid3-row {
            background: transparent !important;

            &.x-grid3-row-selected.x-grid3-row-over {
                background: transparent !important;
            }
        }

        > div {
            width: 100% !important;
        }
    }

    .x-grid3-row {
        padding: 3px;

        .x-grid3-cell-inner {
            color: _theme($ROW--COLOR, $EDIT-ENGINE);
        }

        &.x-grid3-row-over {
            .x-grid3-cell-inner {
                color: _theme($ROW--COLOR---HOVER, $EDIT-ENGINE);
            }
        }
    }

    .x-grid3 .x-grid3-row-table .x-grid3-cell {

        .x-grid3-cell-inner {
            font-family: "Nunito Sans", sans-serif;

            &.x-grid3-col-action {
                padding: 0;
            }

            img {
                padding-top: 4px;
            }

        }
    }

    > .x-grid-panel.x-component.x-border-panel .x-panel-fbar {
        @include _button(".button-cancel", "FORM_SMALL", "remove-icons");
        @include _button(".button-noworkflow", "FORM_SMALL", "remove-icons");
        @include _button(".button-start", "FORM_SMALL", "remove-icons");
        @include _button(".button-bypassworkflow", "FORM_SMALL", "remove-icons");
    }

    > .x-grid-panel.x-component.x-border-panel .x-grid3 .x-grid3-row {
        &.x-grid3-row-selected {
            background-color: _color("secondary", c) !important;
        }
    }

    .x-panel-fbar {

        .x-toolbar-ct {
            float: right;
        }
    }

    .x-border-layout-ct:nth-child(1) > .x-border-panel { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 7 */
        color: _theme($SUBTITLE--COLOR, $EDIT-ENGINE);
        padding-top: 20px;
        height: calc(100% - 3px) !important;
        margin: 0 !important;
        width: calc(100% - 30px) !important;

        > table.x-component {
            margin: 0 0 0 25px;
        }

        .x-component {
            font-size: 14px;
            color: _color("primary", normal);
            font-weight: 300;
        }
    }

    .x-tab-panel-body {
        border-color: _color("primary");

        .x-grid3-body {
            padding-right: 160px;
            padding-left: 0;
        }

        .x-grid3-scroller .x-grid3-body {
            overflow-x: hidden;
            overflow-y: scroll;
            width: calc(100% - 14px);
            padding-right: 10px;

            > .x-grid-group {
                padding-left: 20px;

                &:nth-child(even) {
                    background: linear-gradient(to right, #e3e2e2 50%, rgba(227, 226, 226, 0) 100%);
                }
            }
        }

        .x-panel-fbar .x-btn.x-btn-noicon button {
            background: _theme($BUTTON--BG, $EDIT-ENGINE) !important;
            color: _theme($BUTTON--COLOR, $EDIT-ENGINE) !important;
            height: 24px !important;
            font-size: 12px;
        }

        .x-grid-group-hd {
            border: none;
            padding: 4px 0;
            padding-top: 8px;

            .x-grid-group-div {
                color: _theme($FIELDSET--TITLE-COLOR, $EDIT-ENGINE);
                font-weight: 300;
                font-size: 18px;
                font-family: "Nunito Sans", sans-serif;
                padding-left: 11px;
                background-image: url(../images/icons/icon-toggle-expanded-small-normal.png); /* OPTIMISE URL ::: css/app/workflow/_overrides.scss ::: 1 */
                background-size: 7px 5px;
                background-position: left;
            }
        }

        .x-grid-group-collapsed .x-grid-group-hd .x-grid-group-div {
            background-image: url(../images/icons/expand-side-panel@X2.png); /* OPTIMISE URL ::: css/app/workflow/_overrides.scss ::: 2 */
            background-size: 5px 7px;
            background-position: left;
        }

        .x-grid3 .x-grid3-row-table .x-grid3-cell .x-grid3-cell-inner {
            font-size: 14px;
            color: _color("primary", normal);
            font-weight: 300;
        }
    }

    .x-border-layout-ct:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 8 */
        width: 100% !important;
        height: 100% !important;

        > .x-border-panel {
            position: initial !important;

            &:first-child { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 9 */
                width: 100% !important;
                margin-bottom: 30px;
                margin-top: 190px;
                height: auto !important;
                position: relative !important;
                z-index: 999;

                &:empty {
                    margin-bottom: 0;
                }

                > .x-component {
                    color: _color("secondary", a);
                    position: relative;
                    margin-bottom: 1px;
                    border: none !important;
                    background: url(../images/icons/speech-DARK@X2.png) no-repeat center left 10px !important; /* OPTIMISE URL ::: css/app/workflow/_overrides.scss ::: 3 */
                    background-size: 29px !important;
                    padding: 7px 10px 7px 50px;
                    box-sizing: border-box;
                    margin-left: 2px;

                    &:nth-child(even) {
                        background: url(../images/icons/speech-DARK@X2.png) no-repeat center left 10px, linear-gradient(to right, #e3e2e2 50%, rgba(227, 226, 226, 0) 100%) !important; /* OPTIMISE URL ::: css/app/workflow/_overrides.scss ::: 4 */
                        background-size: 29px, 100% !important;
                    }

                    > table {
                        width: 100%;

                        > tbody > tr > td {

                            display: block;

                            &:nth-child(1) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 10 */
                                // Message
                                margin-top: 21px;

                                div {
                                    @include text(_size("normal"), _theme($COMMENTS--COLOR, $EDIT-ENGINE), _weight("light"));
                                }
                            }

                            &:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 11 */
                                // Author / date
                                position: absolute;
                                top: 5px;
                                width: 100%;

                                > div {
                                    width: 100% !important;
                                }

                                tr {
                                    display: inline-block;

                                    &:nth-child(1) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 12 */
                                        // Date
                                        div {
                                            @include text(_size("normal"), _theme($COMMENTS--COLOR--DATE, $EDIT-ENGINE), _weight("light"));
                                        }
                                    }

                                    &:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 13 */
                                        // Author
                                        div {
                                            @include text(_size("normal"), _theme($COMMENTS--COLOR--AUTHOR, $EDIT-ENGINE), _weight("light"));
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                &:empty:before {
                    content: "No comments";
                    text-align: center;
                    width: calc(100% - 162px);
                    position: absolute;
                    margin-top: 54px;
                    color: _color("primary", e);
                    font-size: 12px;
                    height: 16px;
                    font-family: "Raleway", sans-serif;
                }

            }

            &:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 14 */
                position: absolute !important;
                top: -189px !important;
                height: 184px !important;

                .x-panel-bwrap {
                    width: 100% !important
                }

                .x-form-item {
                    margin: 0 !important;
                    padding-bottom: 50px !important;
                    border: none !important;
                    padding: 43px 10px 20px 39px !important;
                    margin: 0 23px 0px 0 !important;
                    position: relative;
                    box-sizing: border-box;
                    border-bottom: 1px solid #c4c0c0 !important;

                    &.x-panel-collapsed {
                        background: transparent;
                        border-bottom: 1px solid #c4c0c0 !important;
                        padding-bottom: 10px !important;

                    }
                }


                label {
                    @include _label("legend");
                }


                textarea {
                    @include _input($EDIT-ENGINE);
                    height: 100% !important;
                    width: calc(100% - 32px) !important;
                }
            }
        }
    }

    .x-border-layout-ct:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 15 */
        form button.x-btn-text {
            position: relative;
            top: -42px;
            color: _color("secondary", g) !important;
        }

        > .x-border-panel .x-form-element .x-form-field-wrap.x-component {
            overflow-y: scroll;
            overflow-x: hidden;
            height: 87px !important;
            padding: 2px;
            width: 100% !important;
        }
    }


    &.engine-cards {
        width: calc(100% - 144px) !important;

        .x-border-layout-ct:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 16 */
            height: calc(100% - 190px) !important;
        }

        .x-border-layout-ct:nth-child(2) > .x-border-panel:first-child { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 17 */
            height: 100% !important;
        }
    }


    /* Content review from workflow dashboard. */

    &.x-panel.engine-panel.enginecards-ctn {
        > .x-panel-bwrap {
            margin-top: 16px;
            height: 100% !important;
        }
    }

    &.x-panel.engine-panel {

        > .x-panel-bwrap {

            div.x-tab-panel-body {
                height: calc(100% - 163px) !important;

                > div:not(.x-border-layout-ct) {
                    height: auto !important;

                    > div {
                        height: auto !important
                    }
                }
            }

            .x-tab-strip.x-tab-strip-top {
                margin-top: 20px !important;
            }

            margin-top: 274px;
            background: linear-gradient(to bottom, #dbdbdb 1%, #d5d5d5 100%);
            box-shadow: inset 0 1px 2px 1px _color("black", a);
        }

        .x-toolbar-left {
            bottom: 10px !important;
        }

        .x-tab-strip {
            margin-top: 90px !important;
        }

        &:before {
            content: "Workflow" !important;
        }

        > div.x-panel-header .x-panel-header-text {
            color: _color("tertiary", normal);
            display: inline-block;
            position: fixed;
            width: 100%;
            left: 6px;
            top: 44px;
            font-weight: 100;
            max-width: calc(100% - 100px);
            font-size: 18px;

            &:before {
                content: "" !important;
            }
        }

        > .x-panel-bwrap {

            > .x-panel-bbar {
                padding-bottom: 20px;

                .x-toolbar-ct {
                    float: none;
                }

                .x-panel-fbar .x-toolbar-cell {

                    padding-bottom: 0 !important;
                    float: unset;
                    margin-left: 5px !important;

                    > table:not(.button-cancel) {
                        button {
                            padding: 8px 15px !important;
                            background: _color("tertiary", normal) !important;
                            font-family: _font("nunito");
                            font-size: 14px;
                            color: #F5F5F5 !important;
                            font-weight: _weight("extralight");
                            height: auto;
                            width: auto !important;

                            img {
                                display: none;
                            }
                        }
                    }
                }
            }
        }

        .x-tab-panel .x-tab-panel-body {
            overflow-y: auto;
            border: none !important;
            height: calc(100% - 102px) !important;

            .x-form-label-left > .x-form-item:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 18 */
                margin-top: 24px;
            }

            .x-form-label-left > .x-form-item .cke {
                width: 100% !important;
            }

            > div:nth-child(1) { /* OPTIMISE SELECTOR ::: css/app/workflow/_overrides.scss ::: 19 */
                overflow: scroll;
                height: calc(100% - 169px) !important;
                width: 100% !important;
            }
        }
    }
}

